<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <input id="c-id"  class="form-control" name="row[id]" type="hidden" value="{$row.id|htmlentities}">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mobile" data-rule="required" class="form-control" name="row[mobile]" type="number" value="{$row.mobile}" readonly>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('店铺名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('平台扣点')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ratio" class="form-control" name="row[ratio]" type="number" placeholder="3代表3%" value="{$row.ratio}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('营业时段')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-open" class="form-control" name="row[open_time]" type="text" value="{$row.open_time}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('客服电话')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tel" class="form-control" name="row[tel]" type="number" value="{$row.tel}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('美团名字')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mt_name" class="form-control" name="row[mt_name]" type="text" value="{$row.mt_name}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('抖音总ID')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-dou_id" class="form-control" name="row[dou_id]" type="text" value="{$row.dou_id}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('抖音门店ID')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-poi_id" class="form-control" name="row[poi_id]" type="text" value="{$row.poi_id}">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('平台余额')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-is_join_balance" class="form-control selectpicker" name="row[is_join_balance]">
                {foreach name="joinBalance" item="v"}
                    <option value="{$key}" {in name="key" value="$row.is_join_balance"}selected{/in}>{$v}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('店铺状态')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('店铺类型（多选）')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="checkbox"> <!-- 1. radio 改为 checkbox -->
                {foreach name="shopType" item="vo"}
                <label for="row[shoptype]-{$key}">
                    <input id="row[shoptype]-{$key}" name="row[shop_type][]" type="checkbox" value="{$key}" {in name="key" value="$row.shop_type"}checked{/in} />
                    {$vo}
                </label>
                {/foreach}
            </div>
        </div>
    </div>

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('店铺类型')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->

<!--            <div class="radio">-->
<!--                {foreach name="shopType" item="ve"}-->
<!--                <label for="row[shoptype]-{$key}"><input id="row[shoptype]-{$key}" name="row[shop_type]" type="radio" value="{$key}" {in name="key" value="$row.shop_type"}checked{/in} /> {$ve}</label>-->
<!--                {/foreach}-->
<!--            </div>-->

<!--        </div>-->
<!--    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class='control-relative'>
                <input id="city_val" value="{$row.city|htmlentities}" type="hidden">
                <input id="c-city"  data-level="city" placeholder="请选择省/市" class="form-control" data-toggle="city-picker" name="row[city]" type="text" value="">
            </div>

<!--            <input id="city_val" value="{$row.city|htmlentities}" type="hidden">-->
<!--            <div id="new_div"></div>-->
<!--            <div class='control-relative'><input id="c-city" data-rule="required" class="form-control" data-toggle="city-picker" name="row[city]" type="text" value="{$row.city}"></div>-->
        </div>
    </div>


    <div class="form-group">
        <label for="c-logo" class="control-label col-xs-12 col-sm-2">{:__('Logo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-logo" data-rule="" class="form-control" size="50" name="row[logo]" type="text" value="{$row.logo}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-logo" class="btn btn-danger faupload" data-input-id="c-logo" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-logo"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-logo" class="btn btn-primary fachoose" data-input-id="c-logo" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-logo"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-logo"></ul>
        </div>
    </div>


    <div class="form-group">
        <label for="c-logo" class="control-label col-xs-12 col-sm-2">{:__('店铺企微群')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-qun_url" data-rule="" class="form-control" size="50" name="row[qun_url]" type="text" value="{$row.qun_url}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-qun_url" class="btn btn-danger faupload" data-input-id="c-qun_url" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-qun_url"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-qun_url" class="btn btn-primary fachoose" data-input-id="c-qun_url" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-qun_url"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-qun_url"></ul>
        </div>
    </div>

<!--    <div class="form-group">-->
<!--        <label for="c-video" class="control-label col-xs-12 col-sm-2">{:__('视频')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="input-group">-->
<!--                <input id="c-video" data-rule="" class="form-control" size="50" name="row[video]" type="text" value="{$row.video}">-->
<!--                <div class="input-group-addon no-border no-padding">-->
<!--                    <span><button type="button" id="faupload-video" class="btn btn-danger faupload" data-input-id="c-video" data-mimetype="mp4" data-multiple="false" data-preview-id="p-video"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                    <span><button type="button" id="fachoose-video" class="btn btn-primary fachoose" data-input-id="c-video" data-mimetype="mp4/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                </div>-->
<!--                <span class="msg-box n-right" for="c-video"></span>-->
<!--            </div>-->
<!--            <ul class="row list-inline faupload-preview" id="p-video"></ul>-->
<!--        </div>-->
<!--    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('代理商电话')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ref_mobile" class="form-control" name="row[ref_mobile]" type="number"  value="{$row.ref_mobile|htmlentities}">
        </div>
    </div>

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('到店视频')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-video" class="form-control" name="row[video]" type="text"  value="{$row.video|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('代理商扣点')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-agent_ratio" class="form-control" name="row[agent_ratio]" type="number" placeholder="1代表1%" value="{$row.agent_ratio|htmlentities}">
        </div>
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
